﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Tools
{
    public partial class FormTxt : Form
    {
        public FormTxt(string txt)
        {
            InitializeComponent();
            this.textBox1.Text = txt;
            //button1.Focus();
            this.AcceptButton = button1;
        }
        private void FormTxt_Load(object sender, EventArgs e)
        {
            button1.Focus();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog2 = new SaveFileDialog();
            saveFileDialog2.FileName = "_未交名单";
            saveFileDialog2.Filter = "txt files (*.txt)|*.txt";
            saveFileDialog2.Title = "导出未交名单";
            if (saveFileDialog2.ShowDialog() == DialogResult.OK)
            {
                File.WriteAllText(saveFileDialog2.FileName, textBox1.Text);
            }
        }
    }
}
